<%@ page import="java.util.*,com.google.appengine.api.users.*,milu.models.MyUser" %>
<jsp:include page="/header.jsp" />
<%
MyUser myUser = (MyUser)request.getAttribute("myUser");
if(myUser != null) {
%>
    You're already logged in
<% } else { 

%>

        <div id="link-form">
            <%
            String error = (String)request.getAttribute("error");
            if(error != null) {
            %>
			<h2 class="cabin error"><%=error%></h2>
            <% } else { %>
			<h2 class="cabin">Registrati:</h2>
            <% } %>
			
            <form action="/register" method="post">
                <input type="hidden" name="returnurl" value="<%=request.getParameter("returnurl")%>" />
				<p>
					<label for="name">Nome:</label>
                    <input id="name" type="text" name="name">
				</p>
				<p>
					<label for="email">Email:</label>
                    <input id="email" type="text" name="email">
				</p>
				<p>
					<label for="password">Password:</label>
                    <input id="password" type="password" name="password" />
				</p>
				
				<p class="last-p"><button type="submit">Registrati!</button></p>
			</form>
        </div><!-- /link-form -->

<%

} %>
<jsp:include page="/footer.jsp" />
